<?php
/**
 * Created by PhpStorm.
 * User: sunshubo
 * Date: 2017/12/12
 * Time: 9:48
 */

class GetActiveList_control extends MY_Controller
{
    function index()
    {
        $body = $this->input->raw_input_stream;
        $body = json_decode($body);
        if ($body->type === 'list') {
            $this->load->model('active/GetActiveList_model', 'getList');
            $res = $this->getList->get_active_list();
            if ($res){
                echo json_encode(array('msg' => 'ok', 'resutl' => SUCCESS, 'list' => $res));
            }else{
                echo json_encode(array('msg' => 'err', 'resutl' => ERROR));
            }
        }
    }
}